load c:\manoj\projects\plasma\HUA_PIU1.mat HP;
HP = HP(:,1:5:end);
load c:\manoj\projects\ace\substorm;
load c:\manoj\projects\substorm\selected_substorm;
fday_substorm = selected_substorm;
fday_substorm = non_selected_substorm;
i_counter=0;
radius_epoch = 1/24;

for i = 1:length(fday_substorm),
    
    
           
           L = HP(2,:) > fday_substorm(i)-radius_epoch & ...
               HP(2,:) < fday_substorm(i)+radius_epoch;
           
           kk = sum(L);
           
           
           if kk ==  floor(radius_epoch*2*(1440/5)),
           i_counter = i_counter+1;
           SEG_HUA(i_counter,:) = HP(1,L);               
           if (mod(i,1000) == 0)
           display(i);
            end;
           end;
           
           
           end;
           


